package com.example.ObserverPattern_Listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * <pre>
 * 功能描述：
 * </pre>
 *
 * @author: 李明杰
 * @date: 2023/3/9 13:37
 */
@Slf4j
@Component
public class BlockedListNotifier {


    @EventListener
    @Async
//    @Order
    public void processBlockedListEvent(BlockedListEvent event) {
        log.error("the event address is {}, content is {}", event.getAddress(), event.getContent());
        // notify appropriate parties via notificationAddress...
    }
}


